package com.shuyu.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

@Data
@ApiModel("订单")
@TableName("tbl_order")
public class Order implements Serializable {
    private static final long serialVersionUID = -4070809919656181898L;
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    @ApiModelProperty(value = "订单号")
    private String orderSn;
    @ApiModelProperty(value = "商品价格")
    private Double price;
    @ApiModelProperty(value = "支付金额")
    private Double payAmount;
    @ApiModelProperty(value = "商品ID")
    private Integer productId;
    @ApiModelProperty(value = "用户id")
    private Long customerId;
    @ApiModelProperty(value = "支付状态0未支付 1支付成功")
    private Integer status;
    @ApiModelProperty(value = "支付来源1微信支付 2支付支付")
    private Integer orderSource;
    @ApiModelProperty(value = "订单创建时间")
    private Date createTime;
    @ApiModelProperty(value = "支付时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date payTime;
    private Date modifyTime;
    @ApiModelProperty(value = "外部订单号")
    private String tradeNo;
    @ApiModelProperty(value = "支付积分数")
    private Integer point;
    @ApiModelProperty(value = "第三方道具ID")
    private String propId;
    @ApiModelProperty(value = "权益来源:1:大有;2:中葡;3:敦煌文化;")
    private Integer source;
    @ApiModelProperty(value = "兑换状态0未兑换 1已兑换")
    private Integer exchangeStatus;
    @ApiModelProperty(value = "购买数量")
    private Integer count;

    public Order() {
    }

    public Order(String orderSn, Double price, Double payAmount, Integer productId, Long customerId, Integer status, Integer orderSource, Date createTime, Integer source, String propId,Integer count) {
        this.orderSn = orderSn;
        this.price = price;
        this.payAmount = payAmount;
        this.productId = productId;
        this.customerId = customerId;
        this.status = status;
        this.orderSource = orderSource;
        this.createTime = createTime;
        this.source = source;
        this.propId = propId;
        this.count = count;
    }
}
